<template>
  <div class="content">
    <div class="content-header">
      <div class="usercontroduce">
        <div class="thumb">
          <img src="../assets/thumb.png" alt="">
        </div>
        <div class="username">{{user.nickname}}</div>
      </div>
      <div class="icon">
        <van-icon name="setting-o" size="26" />
        <van-icon name="more-o" size="26" />
      </div>
    </div>
    <div class="content">
      <img src="../assets/own.png" alt="" />
    </div>
  </div>
  <Tabbar :tab="3"></Tabbar>
</template>

<script>
import { reactive, toRefs } from '@vue/reactivity';
import Tabbar from "../components/Tabbar.vue";
import { onMounted } from '@vue/runtime-core';
import { useStore } from 'vuex'
export default {
  setup() {
    onMounted(() => {
      console.log(store.state.user);
      state.user = store.state.user
    })
    const store = useStore()
    const state = reactive({
      user: {}
    })
    return{
      ...toRefs(state)
    }
  },
  components: { Tabbar },
};
</script>

<style lang="less" scoped>
.content {
  background: #F7F8F9;
  overflow: scroll;
  .content-header {
    background: #FFF;
    width: 100%;
    display: flex;
    box-sizing: border-box;
    padding: 20px 20px;
    height: 100px;
    // background: #111;
    justify-content: space-between;
    .usercontroduce {
      display: flex;
      width: 210px;
      // background: pink;
      align-items: center;
      .thumb {
        border-radius: 50%;
        width: 50px;
        // background: red;
        overflow: hidden;
        height: 50px;
        img {
          width: 100%;
          height: 100%;
        }
      }
      .username {
        box-sizing: border-box;
        padding-left: 15px;
        font-size: 18px;
        font-weight: 800;
      }
    }
    .icon {
      width: 80px;
      display: flex;
      align-items: center;
      justify-content: space-between;

    }
  }
  .content {
    width: 100%;
    margin-top: 30px;
    img {
      width: 100%;
    }
  }
}
</style>